package com.game.data.vo.attribute
{
	import config.Config;
	
	public final class MonsterAttribVO extends BaseAttribVO
	{
		public function MonsterAttribVO()
		{
			super();
		}
		
		/*===============================必要参数===================================*/
		//怪物名称
		public var monsterName:String = "unknown";
		//经验值
		public var exp:int = 0;
		//灵魂值
		public var gxp:int = 0;
		//掉落物品概率，值为10则代表10%的概率掉落装备
		public var probability:Number = 0;
		//掉落列表
		public var fallList:Array = [];
		//是否boss
		public var isBoss:Boolean = false;
		
		//技能CD
		//格式：[初始CD，间隔CD]以秒为单位。如[3,10]意思是出场3s后才可以使用此技能，10s后才能再次使用
		public var skillCD1:Array = [0, 0];//技能CD1
		public var skillCD2:Array = [0, 0];//技能CD2
		public var skillCD3:Array = [0, 0];//技能CD3
		public var skillCD4:Array = [0, 0];//技能CD4
		
		/*===============================非必要参数===================================*/
		//是否静态，若为true，则不会被强制牵引
		public var isStatic:Boolean = false;
		//普通攻击率，值为10则代表10%的概率
		public var normalAttackRate:Number = 45;
		//无目标时等待率，值为10则代表10%的概率
		public var waitRateWhenNoTarget:Number = 13.7;
		//普通攻击范围
		public var attackRange:int = 250;
		//寻敌范围
		public var alertRange:int = 1000;
		
		override public function updateFromObject(param1:Object):void
		{
			super.updateFromObject(param1);
			for(var i:int = 1; i <= 4; i++)
			{
				this["skillCD" + i.toString()][0] *= Config.getIns().frameClips;
				this["skillCD" + i.toString()][1] *= Config.getIns().frameClips;
				this["skillCD" + i.toString()][0] = int(this["skillCD" + i.toString()][0]);
				this["skillCD" + i.toString()][1] = int(this["skillCD" + i.toString()][1]);
			}
			setFullHp();
		}
	}
}